package com.example.oj.entity;

import cn.hutool.log.Log;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;

/**
 *
 * @TableName question
 */
@TableName(value ="question")
@Data
public class Question implements Serializable {
    /**
     *
     */
    @TableId
    private Long id;

    /**
     * 题目编号 TODO 加索引
     */
    private String code;

    /**
     * 比赛Id
     */
    private Long competitionId;

    /**
     * 题目名称
     */
    private String title;

    /**
     * 题目信息
     */
    private String content;

    /**
     * 题目标签
     */
    private String tags;

    /**
     * 难度
     */
    private Integer difficulty;

    /**
     * 题目提交数
     */
    private Integer submitNum;

    /**
     * 题目通过数
     */
    private Integer acceptedNum;

    /**
     * 题目点赞数
     */
    private Integer thumbNum;

    /**
     * 题目配置，时间限制ms，内存限制mb
     */
    private String judgeConfig;

    /**
     * 测试输入样例、测试输出样例
     */
    private String judgeCase;

    /**
     * 作者Id
     */
    private Long userId;

    /**
     *
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     *
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    /**
     *
     */
    private Integer deleted;

    /**
     * 是否比赛用题
     */
    private Integer isQueried;

    /**
     * 分数
     */
    private Integer score;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}